---url 字符串解析

local function chardecode(h)
    return string.char(tonumber(h, 16))
end

return function (str)
    if not str then return "" end
    str = str:gsub('+', ' ')
    str = str:gsub('%%(%x%x)', chardecode)
    return str
end
